//
//  BaseJSONService.h
//  EPTool
//
//  Created by guoshiqing on 2018/4/9.
//  Copyright © 2018年 云数动能科技. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AFNetworking/AFNetworking.h>


NS_ASSUME_NONNULL_BEGIN
@interface BaseJSONService : NSObject

@property (nonatomic, strong) AFHTTPSessionManager *manager;
@property (nullable, nonatomic, copy) NSString *strTeamId;


+ (BOOL)netWorkReachability;
+ (instancetype)share;


//////////////////////////////// https ////////////////////////////////
/**
 普通的POST方法请求
 
 @param url         请求地址
 @param parameters  参数列表（字典）
 @param success     成功返回
 @param failure     失败返回
 */
- (void)postMethodSupportJSONWithUrl:(NSString *)url
                          parameters:(nullable NSDictionary *)parameters
                             success:(void(^)(id data))success
                               error:(void(^)(NSError *err))error
                             failure:(void(^)(void))failure;


- (void)getMethodSupportJSONWithUrl:(NSString *)url
                         parameters:(NSDictionary *)parameters
                            success:(void(^)(id data))success
                              error:(void(^)(NSError *err))error
                            failure:(void(^)(void))failure;
#pragma mark - 子类实现
// 设置头部
- (void)setHttpHead;

@end
NS_ASSUME_NONNULL_END

